﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Data;
using System.Web;
using System.Web.Mvc;
using MvcETicaretDenemesi.Models;

namespace MvcETicaretDenemesi.Models
{
    public class HomeController : Controller
    {
        EDBDataContext DB = new EDBDataContext();
        //
        // GET: /Home/

        public ActionResult Index()
        {
            return View(new IndexLists { 
                                CategoryListe = DB.Categories.ToList(), 
                                ProductListe = DB.Products.ToList(),
                                BannerListe = DB.Banners.Where(a=>a.BnrActive==true).ToList()
                                });
        }

    }
}
